import {Component} from "react";
import {Table,Button} from "antd";
import {getUser} from "../request/api";
let List=[]
const columns =[
    {
        title:'姓名',
        dataIndex:'name',
        key:'name',
    },
    {
        title:'账户',
        dataIndex: 'account',
        key:'account'
    },
    {
        title: '手机号',
        dataIndex: 'phone',
        key:'phone'
    },
    {
        title: '邮箱',
        dataIndex: 'email',
        key: 'email'
    },
    {
        title: '性别',
        dataIndex: 'sex',
        key: 'sex'
    },
    {
        title:'操作',
        dataIndex: 'options',
        key:'options',
        render(){
            return(
                <>
                    <Button type="primary" >修改</Button>
                    <Button type="primary" danger>删除</Button>
                </>
            )
        }
    }
]
class Users extends Component{
    render() {
        return(
            <Table columns={columns} dataSource={List}/>
        )
    }
    componentDidMount() {
            let data = getUser();
            console.log(data);
    }
}
export default Users